package com.hex.ds.code.detection.common.exception;

import lombok.Data;

/**
 * @Package: com.hex.ds.code.detection.component.common.exception
 * @ClassName BizException
 * @Description: 业务异常
 * @Author: wz.li
 * @Date 2023/10/30 13:48
 * @Version v2.0.2
 **/
@Data
public class BizException extends RuntimeException {
    private String code;
    private String errMsg;

    public BizException(String code, String errMsg, Exception e) {
        super(code, e);
        this.code = code;
        this.errMsg = errMsg;
    }

    public BizException(String code, String errMsg) {
        this.code = code;
        this.errMsg = errMsg;
    }

    public BizException(String errMsg, Exception e) {
        super("000000001", e);
        this.errMsg = errMsg;
    }

    public BizException(String errMsg) {
        this.errMsg = errMsg;
    }
}
